home *** CD-ROM | disk | FTP | other *** search
/ MacSilverWare / macsilverware.iso / Control Panels / MICN 1.9 / MICN Docs / MICN Docs next >
Text File  |  1993-02-22  |  6KB  |  81 lines

  1.  
  2.             MICN
  3.  
  4. Display small iconic representation for menu titles.
  5. Version 1.9
  6.  
  7. This hack is an implementation of an idea suggested by USENET readers* as a method for reclaiming menu bar space.  It has no real interface, but it is configurable (with ResEdit).  I pronounce the name “my-kin”; you can pronounce it however you like, Pat.
  8.  
  9. MICN is still free, still less than 20K on your disk, and it’s still only 580 bytes of code in your System Heap!  MICN does not replace the titles of menus in memory, so programs that use these titles will find them in the proper place.
  10.  
  11. MICN comes preconfigured to display SICNs for the following menu titles:  File, Edit, Font, Help, Window(s).  If you want to add more SICNs, remove the standard ones, or otherwise customize MICN, you will need ResEdit or a similar resource editor.
  12.  
  13. There are some color icons for the standard menus and for Finder’s menus, and more can be added as you wish.  However, color icons can only be accessed from the global MICN list (wait for the next release if you really need color icons in local MICN lists).
  14.  
  15. MICN Lists
  16. MICN uses a special resource/data structure, called a MICN list, to determine which menu titles it replaces with icons.  MICN lists may be edited with ResEdit by double-clicking on the appropriate MICN resource (a resource template (TMPL) is provided to make editing easier).  The format of a MICN list is loosely comparable to this Pascal record structure:
  17.  
  18.     MICNList = array [1..n] of record
  19.         title: string;
  20.         width: integer;
  21.         index: integer;
  22.         resID: integer;
  23.         cicnID: integer
  24.     end;
  25.  
  26. title:    the title of the menu to replace (e.g. “File” or “Edit”)
  27. width:    the width of the SICN in pixels (0 defaults to 16)
  28. index:    index within the SICN resource of this menu’s icon
  29. resID:    resource ID of the SICN resource that contains this menu’s icon.
  30. cicnID:   resource ID of the cicn resource that contains the menu’s color icon.
  31.  
  32. (Note that the last four fields are packed against the string on word boundary.)
  33.  
  34. 'SICN' resources
  35. MICN displays a SICN resource for the menu titles it is told to iconify.  This is a standard resource type that can be created and edited using ResEdit.  Each menu title has two icons within it’s SICN resource: enabled and disabled.  The index field of a MICN list refers to the index of the enabled icon, and the disabled icon follows immediately afterwards.  For this reason, index will usually be even, and every SICN resource will have an even number of icons.
  36.  
  37. 'cicn' resources
  38. MICN displays a cicn (color icon) resource for the menu titles it is told to iconify if color is available on the system.  This is a standard resource type that can be created and edited using ResEdit.  Why cicn resources and not ics4/ics8 resources?  Well, it was the easiest way to go at the time.  I think a later version will look for ics4/ics8 icons as well as cicns and SICNs, so be patient if you think this is important.  Hey, at least it still works with System 6 (and back to 4.1, for that matter).
  39.  
  40. Global MICN list
  41. MICN maintains a “Global” MICN list, which it uses to replace menu titles in ALL open applications.  This list is kept in MICN’s resource fork and must be MICN=128 (res type is MICN, res id is #128).  This list is consulted FIRST when determining whether or not to iconify a menu title.  If you make any changes, you must restart for them to take effect.
  42.  
  43. Application MICN lists
  44. Each application can have its own private MICN list, and associated SICNs.  To give an app a private list, merely add a resource of type MICN, id #128, to the app’s resource fork, fill it with appropriate values, and also create the associated SICN resource(s).  An application’s MICN list is consulted AFTER the global MICN list.  It will be used as soon as you open the application; you needn’t restart your computer.
  45.  
  46. (In)compatabilities, bugs, and other foo
  47. Although I haven’t encountered any incompatabilities yet, I’m sure they exist.  I have tested on A Mac 512Ke, Plus, II, LC, IIci, and Quadra 700 under System 6.0.5, 7.0, and 7.1.  And the biggest test of all… it works with Microsoft products! :-)  I use traps from IM I and IM II to do the standard B&W icons, and from IM V to do the color icons (after checking for there existance), so I don’t expect too many version problems.  Found a bug?  Send e-mail to me at:  kurash@dartmouth.edu
  48.  
  49. One might conclude that MICN impinges on the speed of your Mac.  To a certain extent, this is true (it has to do something!).  However, if you keep the global MICN list relatively small (less than 100 menu titles is small enough), and put specialized stuff where it belongs (in applications’ private MICN lists), then you won’t notice a thing.
  50.  
  51. What’s changed since 1.0:
  52. 1.1  made the memory-resident code smaller
  53. 1.2  added control panel interface
  54. 1.3  fixed a bug in the interface
  55. 1.4  got rid of that fanTAStic cache-card incompatibility
  56. 1.5  no more on-the-fly patching
  57.      no more self-modifying code
  58.      gray icons for disabled menus on color/grayscale monitors
  59. 1.6  Wherein I correct a mistake
  60.      that only an idiot should make
  61. 1.7  Color icons!  Maybe I’ll work on that interface some day…
  62.      Color icons can only be used from the global MICN list (for now).
  63. 1.8  Whaddayamean you don’t have Color QD? (i.e., I fixed a bug in the INIT)
  64. 1.9  For die-hard System 6 users who have color monitors (can’t use _GetGray)
  65.  
  66. There is now some documentation for the control panel interface, written by:
  67.       Jim Walker (walkerj@milo.math.scarolina.edu)
  68.  
  69. Also, I’ve added some SICNs contributed by:
  70.       Eric Cloninger (ericc@d.cs.okstate.edu)
  71.       Joaquim Baptiste (px@fct.unl.pt)
  72.       Mike Grueter (mikeg@atl.calstate.edu)
  73.       Ralph Lombreglia (ralph@world.std.com)
  74.       Tony Mann (72260.1404@CompuServe.com)
  75.  
  76.  
  77. Legalese
  78. It was USENET’s idea* and my time, so it’s Public Domain for now.  I did this in a day, so there’s no charge, but if it gets any bigger I might consider charging a small fee (“All rights reserved”).  If I catch any PD “distributors” charging for it, or any one else charging for it, I’ll be mad and might do something nasty.  Oh yea, and you better not use my code in your version of this tool (“©1992 Mark Valence”).
  79.  
  80. * actually, Tony Mann posted the original concept (or at least that’s where I saw it first).
  81.